import request from "@/utils/request.js"

/**
 * 分店
 */

export function storeList(data) {
	return request({
		url: '/stock-api/store/list',
		method: 'GET',
		data,
	})
}

export function storeAllList(data) {
	return request({
		url: '/stock-api/store/all_list',
		method: 'GET',
		data,
	})
}


export function storeInfo(id) {
	return request({
		url: '/stock-api/store/' + id,
		method: 'GET',
	})
}

export function storeDel(id) {
	return request({
		url: '/stock-api/store/' + id,
		method: 'DELETE',
	})
}

export function storeSave(data, update = false) {
	return request({
		url: '/stock-api/store',
		method: update ? 'PUT' : 'POST',
		data,
	})
}